<?php

use Illuminate\Support\Facades\Route;
use Modules\DataCheck\Http\Controllers\DataCheckController;
use Modules\DataCheck\Http\Controllers\DcTaskController;
use \Modules\Common\Http\Middleware\AdminBehaviorMiddleware;
use Modules\DataCheck\Http\Controllers\DownloadController;
use Modules\DataCheck\Http\Controllers\SourceFileController;

Route::prefix('dc')->middleware([AdminBehaviorMiddleware::class])->group(function(){
    // 获取目标文件历史记录
   Route::get('/task/history', [DcTaskController::class, 'history'])->name('dcTask.history')->withoutMiddleware([AdminBehaviorMiddleware::class]);
    Route::adminResource('task', DcTaskController::class);

    Route::get('/download/logs', [DownloadController::class, 'logs']);
    Route::post('/download/execute', [DownloadController::class, 'execute']);
    Route::adminResource('download', DownloadController::class);
	//next
    Route::post('/check/start', [DataCheckController::class, 'start'])->name('dataCheck.start');
    Route::post('/check/stop', [DataCheckController::class, 'stop'])->name('dataCheck.stop');
    Route::get('/check/process', [DataCheckController::class, 'process'])->name('dataCheck.process');

    Route::get('/sourceFile/detail', [SourceFileController::class, 'detail'])->name('source.file.detail');
});